\hypertarget{classdev_1_1net_1_1detail_1_1_select_reactor}{}\section{dev\+:\+:net\+:\+:detail\+:\+:Select\+Reactor Class Reference}
\label{classdev_1_1net_1_1detail_1_1_select_reactor}\index{dev\+::net\+::detail\+::\+Select\+Reactor@{dev\+::net\+::detail\+::\+Select\+Reactor}}


{\ttfamily \#include $<$Select\+Reactor.\+hpp$>$}

Inheritance diagram for dev\+:\+:net\+:\+:detail\+:\+:Select\+Reactor\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classdev_1_1net_1_1detail_1_1_select_reactor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual bool \hyperlink{classdev_1_1net_1_1detail_1_1_select_reactor_a4a6e88b02454504628332d69e29590b7}{add\+Socket} (\hyperlink{classdev_1_1net_1_1_socket}{Socket} $\ast$sock, Event\+Type events, \hyperlink{classdev_1_1net_1_1_socket_event_handler}{Socket\+Event\+Handler} $\ast$handler)
\begin{DoxyCompactList}\small\item\em 添加一个套接字到反应器 \end{DoxyCompactList}\item 
virtual bool \hyperlink{classdev_1_1net_1_1detail_1_1_select_reactor_a754ba1aacd7171e7f551a5e92fca23bb}{remove\+Socket} (\hyperlink{classdev_1_1net_1_1_socket}{Socket} $\ast$sock)
\begin{DoxyCompactList}\small\item\em 移除套接字 \end{DoxyCompactList}\item 
\hypertarget{classdev_1_1net_1_1detail_1_1_select_reactor_aa48288bd4e5472d8da2da1b710515f22}{}virtual void \hyperlink{classdev_1_1net_1_1detail_1_1_select_reactor_aa48288bd4e5472d8da2da1b710515f22}{clean} (void)\label{classdev_1_1net_1_1detail_1_1_select_reactor_aa48288bd4e5472d8da2da1b710515f22}

\begin{DoxyCompactList}\small\item\em 清理反应器 \end{DoxyCompactList}\item 
virtual void \hyperlink{classdev_1_1net_1_1detail_1_1_select_reactor_a4f46d46b326a7a4f1a88c79032ace5ea}{tick} (int timeout=0)
\begin{DoxyCompactList}\small\item\em 执行一次网络事件 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
使用select实现的反应器 

\subsection{Member Function Documentation}
\hypertarget{classdev_1_1net_1_1detail_1_1_select_reactor_a4a6e88b02454504628332d69e29590b7}{}\index{dev\+::net\+::detail\+::\+Select\+Reactor@{dev\+::net\+::detail\+::\+Select\+Reactor}!add\+Socket@{add\+Socket}}
\index{add\+Socket@{add\+Socket}!dev\+::net\+::detail\+::\+Select\+Reactor@{dev\+::net\+::detail\+::\+Select\+Reactor}}
\subsubsection[{add\+Socket(\+Socket $\ast$sock, Event\+Type events, Socket\+Event\+Handler $\ast$handler)}]{\setlength{\rightskip}{0pt plus 5cm}bool Select\+Reactor\+::add\+Socket (
\begin{DoxyParamCaption}
\item[{{\bf Socket} $\ast$}]{sock, }
\item[{Event\+Type}]{events, }
\item[{{\bf Socket\+Event\+Handler} $\ast$}]{handler}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classdev_1_1net_1_1detail_1_1_select_reactor_a4a6e88b02454504628332d69e29590b7}


添加一个套接字到反应器 


\begin{DoxyParams}{Parameters}
{\em sock} & 套接字 \\
\hline
{\em events} & 注册的事件 \\
\hline
{\em handelr} & 事件处理器 \\
\hline
\end{DoxyParams}


Implements \hyperlink{classdev_1_1net_1_1_reactor_a53939a07465e8c772b63fb8d31a313ec}{dev\+::net\+::\+Reactor}.

\hypertarget{classdev_1_1net_1_1detail_1_1_select_reactor_a754ba1aacd7171e7f551a5e92fca23bb}{}\index{dev\+::net\+::detail\+::\+Select\+Reactor@{dev\+::net\+::detail\+::\+Select\+Reactor}!remove\+Socket@{remove\+Socket}}
\index{remove\+Socket@{remove\+Socket}!dev\+::net\+::detail\+::\+Select\+Reactor@{dev\+::net\+::detail\+::\+Select\+Reactor}}
\subsubsection[{remove\+Socket(\+Socket $\ast$sock)}]{\setlength{\rightskip}{0pt plus 5cm}bool Select\+Reactor\+::remove\+Socket (
\begin{DoxyParamCaption}
\item[{{\bf Socket} $\ast$}]{sock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classdev_1_1net_1_1detail_1_1_select_reactor_a754ba1aacd7171e7f551a5e92fca23bb}


移除套接字 


\begin{DoxyParams}{Parameters}
{\em sock} & 套接字 \\
\hline
\end{DoxyParams}


Implements \hyperlink{classdev_1_1net_1_1_reactor_a032df9cb5073c0bbc387e8206c6a8507}{dev\+::net\+::\+Reactor}.

\hypertarget{classdev_1_1net_1_1detail_1_1_select_reactor_a4f46d46b326a7a4f1a88c79032ace5ea}{}\index{dev\+::net\+::detail\+::\+Select\+Reactor@{dev\+::net\+::detail\+::\+Select\+Reactor}!tick@{tick}}
\index{tick@{tick}!dev\+::net\+::detail\+::\+Select\+Reactor@{dev\+::net\+::detail\+::\+Select\+Reactor}}
\subsubsection[{tick(int timeout=0)}]{\setlength{\rightskip}{0pt plus 5cm}void Select\+Reactor\+::tick (
\begin{DoxyParamCaption}
\item[{int}]{timeout = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classdev_1_1net_1_1detail_1_1_select_reactor_a4f46d46b326a7a4f1a88c79032ace5ea}


执行一次网络事件 


\begin{DoxyParams}{Parameters}
{\em timeout} & 检查网络事件的超时时间 \\
\hline
\end{DoxyParams}


Implements \hyperlink{classdev_1_1net_1_1_reactor_a82d3315e9f4a00eff67ea868ab7e0b6b}{dev\+::net\+::\+Reactor}.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
dev/dev/net/detail/Select\+Reactor.\+hpp\item 
dev/src/net/detail/Select\+Reactor.\+cpp\end{DoxyCompactItemize}
